The present disclosure relates to a data processing device for identifying a position of a recording medium in a conveyance path, and to an image forming apparatus including the data processing device.
In an image forming apparatus, a light source and a plurality of light reception portions may be provided at a conveyance path in which an unprinted recording medium is conveyed. The light source emits linear light extending in a main scanning direction toward the recording medium that is being conveyed in the conveyance path. The plurality of light reception portions face the light source across the conveyance path, and receive the linear light that has transmitted through the recording medium. The plurality of light reception portions output data that indicates the amounts of light incident on the light reception portions themselves, to a data processing device such as a CPU. The data is output in the main scanning direction one line by one line in sequence. The data processing device performs shading correction on the input data.